/*
 * Rect.h
 *
 *  Created on: 30/05/2013
 *      Author: vitor
 */

#ifndef RECT_H_
#define RECT_H_

#include "Point.h"
#include <algorithm>

class Rect {
private:
	Point position;
	float w, h;

public:
	Rect();
	Rect(float x, float y, float w, float h);
	virtual ~Rect();

	float getH() const {
		return h;
	}

	void setH(float h) {
		this->h = std::max((float) 0, h);
	}

	Point* getPositionRef() {
		return &position;
	}

	void setPosition(const Point& position) {
		this->position = position;
	}

	float getW() const {
		return w;
	}

	void setW(float w) {
		this->w = std::max((float) 0, w);
	}
};

#endif /* RECT_H_ */
